﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Data.NHibernate.Args
{
    public class PageAttribute
    {
        private int _pagesize;
        private int _pageindex;
        private int _pagecount;

        /// <summary>
        /// 每页条数；
        /// </summary>
        public int PageSize
        {
            set
            {
                _pagesize = value > 0 ? value : 10;
            }
            get { return _pagesize; }
        }
        /// <summary>
        /// 当前页
        /// </summary>
        public int PageIndex
        {
            set
            {
                _pageindex = value > 0 ? value : 1;
            }
            get { return _pageindex; }
        }
        /// <summary>
        /// 总页数
        /// </summary>
        public int PageCount
        {
            set
            {
                _pagecount = 0;
                _pagecount = value > 0 ? value : 1;
            }
            get { return _pagecount; }
        }
    }
}
